import request from '@/utils/request'


// 查询商品预警数量
export function getProductWarningData(query) {
  return request({
    url: '/prod-api/centre-data/count/product/getProductWarningData',
    method: 'get',
    params: query
  })
}


// 查询商品数据汇总
export function getProductData(startTime,endTime) {
  return request({
    url: '/prod-api/centre-data/count/product/getProductData/'+startTime+"/"+endTime,
    method: 'get',
  })
}

// 查询当天商品数据汇总
export function getTodayProductData(currentTime) {
  return request({
    url: '/prod-api/centre-data/count/product/getProductData/'+currentTime,
    method: 'get',
  })

}
// 查询近一月数据数据汇总
export function getProductDataMap(type) {
  return request({
    url: '/prod-api/centre-data/count/product/getProductDataMap/' + type,
    method: 'get',
  })
}
// 获取商品明细数据
export function getProductDataDetail(query) {
  return request({
    url: '/prod-api/centre-data/count/product/getProductDataDetail',
    method: 'get',
    params: query
  })
}
// 获取比较上周数据涨跌榜
export function getRanking(number,range) {
  return request({
    url: '/prod-api/centre-data/count/product/getRanking/'+number+"/"+range,
    method: 'get'
  })
}
